Connects to an adTempus server, creating a new client session.
HRESULT Connect(BSTR userID, BSTR password, [out,retval] IScheduler** scheduler); HRESULT ConnectRemote(BSTR serverName, BSTR userID, BSTR password, [out,retval] IScheduler** scheduler);
Connect(String userID, String password, [out,retval] IScheduler* scheduler); ConnectRemote(String serverName, String userID, String password, [out,retval] IScheduler* scheduler);
Sub Connect(userID As String, password As String, scheduler As [out,retval] IScheduler*) Sub ConnectRemote(serverName As String, userID As String, password As String, scheduler As [out,retval] IScheduler*)
Parameters |
Description |
[in] BSTR userID |
The Windows user ID to use for authentication. If not specified, adTempus attempts automatic authentication. |
[in] BSTR password |
The password for the specified userID |
[in] BSTR serverName |
The name or IP address of the server to connect to. If the server is configured to use a port other than the default, include the port number following a colon (e.g., "myserver:3761"). |
A new IScheduler object, which provides access to the server.
If a session cannot be established the method will fail with an error indicating the reason. See the ConnectRemote topic for a list of common errors.
Connect attempts to create a new client session with the adTempus service running on the local computer. If a user ID and password are specified, they are used to authenticate the user. Otherwise, the credentials of the user executing the code are used.
Calling Connect is functionally identical to calling ConnectRemote with an empty server name.
If a session cannot be established the method will fail with an error indicating the reason. Common errors are described in the following table:
ADT_E_VERSION_MISMATCH |
The software running on the client is incompatible with the software running on the server. |
ADT_E_LOGIN_FAILURE |
The specified credentials are invalid or login failed. If you did not specify credentials, the error indicates that the server could not authenticate the user automatically; you will need to explicitly pass a user ID and password. |
ADT_E_NO_PERMISSION |
The user does not have permission to connect to adTempus. Use the Console or the Scheduler.ServerSecurityDescriptor to grant connect permission to the user (you'll need to do this using an account that has permission to connect, of course). |
ADT_E_SERVER_NOT_FOUND |
The host name could not be resolved to an address, a connection could not be made to the specified server, or the adTempus service is not running on that computer. |
adTempus API Reference version 3.0.0.0, revised 10/30/2008
|